3.1624 \(\int \frac{1}{(a+\frac{b}{x})^2} \, dx\)

Optimal. Leaf size=34 \[ -\frac{2 b \log (a x+b)}{a^3}+\frac{2 x}{a^2}-\frac{x}{a \left (a+\frac{b}{x}\right )} \]

[Out]

(2*x)/a^2 - x/(a*(a + b/x)) - (2*b*Log[b + a*x])/a^3

________________________________________________________________________________________

Rubi [A]  time = 0.0139466, antiderivative size = 34, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {192, 193, 43} \[ -\frac{2 b \log (a x+b)}{a^3}+\frac{2 x}{a^2}-\frac{x}{a \left (a+\frac{b}{x}\right )} \]

Antiderivative was successfully verified.

[In]

Int[(a + b/x)^(-2),x]

[Out]

(2*x)/a^2 - x/(a*(a + b/x)) - (2*b*Log[b + a*x])/a^3

Rule 192

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Simp[(x*(a + b*x^n)^(p + 1))/(a*n*(p + 1)), x] + Dist[(n*(p +
 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b, n, p}, x] && ILtQ[Simplify[1/n + p + 1
], 0] && NeQ[p, -1]

Rule 193

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b}, x] && LtQ[n, 0]
 && IntegerQ[p]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \frac{1}{\left (a+\frac{b}{x}\right )^2} \, dx &=-\frac{x}{a \left (a+\frac{b}{x}\right )}+\frac{2 \int \frac{1}{a+\frac{b}{x}} \, dx}{a}\\ &=-\frac{x}{a \left (a+\frac{b}{x}\right )}+\frac{2 \int \frac{x}{b+a x} \, dx}{a}\\ &=-\frac{x}{a \left (a+\frac{b}{x}\right )}+\frac{2 \int \left (\frac{1}{a}-\frac{b}{a (b+a x)}\right ) \, dx}{a}\\ &=\frac{2 x}{a^2}-\frac{x}{a \left (a+\frac{b}{x}\right )}-\frac{2 b \log (b+a x)}{a^3}\\ \end{align*}

Mathematica [A]  time = 0.0105784, size = 29, normalized size = 0.85 \[ \frac{-\frac{b^2}{a x+b}-2 b \log (a x+b)+a x}{a^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b/x)^(-2),x]

[Out]

(a*x - b^2/(b + a*x) - 2*b*Log[b + a*x])/a^3

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 34, normalized size = 1. \begin{align*}{\frac{x}{{a}^{2}}}-2\,{\frac{b\ln \left ( ax+b \right ) }{{a}^{3}}}-{\frac{{b}^{2}}{{a}^{3} \left ( ax+b \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b/x)^2,x)

[Out]

x/a^2-2*b*ln(a*x+b)/a^3-b^2/a^3/(a*x+b)

________________________________________________________________________________________

Maxima [A]  time = 0.992022, size = 49, normalized size = 1.44 \begin{align*} -\frac{b^{2}}{a^{4} x + a^{3} b} + \frac{x}{a^{2}} - \frac{2 \, b \log \left (a x + b\right )}{a^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b/x)^2,x, algorithm="maxima")

[Out]

-b^2/(a^4*x + a^3*b) + x/a^2 - 2*b*log(a*x + b)/a^3

________________________________________________________________________________________

Fricas [A]  time = 1.43242, size = 97, normalized size = 2.85 \begin{align*} \frac{a^{2} x^{2} + a b x - b^{2} - 2 \,{\left (a b x + b^{2}\right )} \log \left (a x + b\right )}{a^{4} x + a^{3} b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b/x)^2,x, algorithm="fricas")

[Out]

(a^2*x^2 + a*b*x - b^2 - 2*(a*b*x + b^2)*log(a*x + b))/(a^4*x + a^3*b)

________________________________________________________________________________________

Sympy [A]  time = 0.308269, size = 31, normalized size = 0.91 \begin{align*} - \frac{b^{2}}{a^{4} x + a^{3} b} + \frac{x}{a^{2}} - \frac{2 b \log{\left (a x + b \right )}}{a^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b/x)**2,x)

[Out]

-b**2/(a**4*x + a**3*b) + x/a**2 - 2*b*log(a*x + b)/a**3

________________________________________________________________________________________

Giac [A]  time = 1.10481, size = 46, normalized size = 1.35 \begin{align*} \frac{x}{a^{2}} - \frac{2 \, b \log \left ({\left | a x + b \right |}\right )}{a^{3}} - \frac{b^{2}}{{\left (a x + b\right )} a^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b/x)^2,x, algorithm="giac")

[Out]

x/a^2 - 2*b*log(abs(a*x + b))/a^3 - b^2/((a*x + b)*a^3)